import { staticRoutes,resetRouter } from '@/router'

export default {
    namespaced: true,
    state() {
        return {
            menuList: [...staticRoutes]
        }
    },
    mutations: {
        resetMenu(state) {
            // 重置左侧菜单
            state.menuList = staticRoutes
            // 重置路由系统
            resetRouter()
          },
        setMenuList(state, filterRoutes) {
            state.menuList = [...staticRoutes, ...filterRoutes]
        }
    }
}